package jdbchomework;
import java.sql.*;
import java.*;
public class TestBlob {
	public static void main(String[] args) {
		Connection con = null;
		PreparedStatement ps= null;
		ResultSet rs = null;
		Blob blob = null;
		int id = 1;
		String fileName = args[0];
		try{
			con = JdbcTools.getConn();
			con.setAutoCommit(false);
			String sql = "select FILE_CONTENT " + "from bag where id=?";
			ps = con.prepareStatement(sql);
			ps.setInt(1,id);
			rs = ps.executeQuery();
			if(rs.next()){
				blob = rs.getBlob(1);
			}
		}catch(Exception e){
			e.printStackTrace();
		}finally{}
	}

}
